<template>
    <div>
       <div id="main" style="height: 308px;"></div>
    </div>
</template>

<script>
import echarts from 'echarts'
import {option} from '@/components/Charts/bingtu.js'
import tdTheme from '@/components/Charts/theme.json'
echarts.registerTheme('tdTheme', tdTheme)
export default {
    data () {
        return {
        }
    },
    methods: {
        drawBarChart() {
            var myChart = echarts.init(document.getElementById('main'), 'tdTheme');
            myChart.setOption(option, true);  
            myChart.hideLoading();
            myChart.setOption({
                series: [{
                    type: 'pie',
                    data:[
                        {value:this.$parent.videoCount, name:'视频上传'},
                        {value:this.$parent.fileCount, name:'文件上传'},
                        {value:this.$parent.chechStatusCount, name:'待审核资源'}    
                    ]
                }]
            })
        }
    },
}
</script>